//package oop.demo.zoomanagementsystem;
package top.anka1.ims.ZooManagementSystem;
/**
 * Logistics Class - Manages transportation details for animal movements
 * @author anka
 */
public class Logistics {
    public Item vehicle;
    public Item fuel;
    public String[] caretakers;
    public Zoo fromZoo;
    public Zoo toZoo;

    public Logistics(Item vehicle, Item fuel, String[] caretakers) { // Constructor
        this.vehicle = vehicle;
        this.fuel = fuel;
        this.caretakers = caretakers;
    }
    public Logistics(Zoo fromZoo, Zoo toZoo, Item vehicle, Item fuel, String[] caretakers) {
        this.fromZoo = fromZoo;
        this.toZoo = toZoo;
        this.vehicle = vehicle;
        this.fuel = fuel;
        this.caretakers = caretakers;
    }
    public Item getVehicle() { // Get the vehicle used for transportation
        return vehicle;
    }
    public void setVehicle(Item vehicle) { // Set the vehicle used for transportation
        this.vehicle = vehicle;
    }
    public Item getFuel() { // Get the fuel used for transportation
        return fuel;
    }
    public void setFuel(Item fuel) { // Set the fuel used for transportation
        this.fuel = fuel;
    }
    public String[] getCaretakers() { // Get the caretakers involved in the transportation
        return caretakers;
    }
    public void setCaretakers(String[] caretakers) { // Set the caretakers involved in the transportation
        this.caretakers = caretakers;
    }
    public void display() { // Display the logistics details
        System.out.println("Vehicle: " + vehicle.name);
        System.out.println("Fuel: " + fuel.name);
        System.out.print("Caretakers: ");
        for (String caretaker : caretakers) {
            System.out.print(caretaker + " ");
        }
        System.out.println();
    }

    public Zoo getFromZoo() {
        return fromZoo;
    }
    public Zoo getToZoo() {
        return toZoo;
    }
    public double getTotalCost() { // Calculate the total cost of transportation
        return vehicle.price + fuel.price;
    }
}
